import pymysql
conn=pymysql.connect(host='localhost',user='root',password='123456',database='test')
cur=conn.cursor()
cur.execute('''select * from teacher''')
result=cur.fetchall()
for i in result:
    print(i)
conn.close()
